home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 1995 #5 & #6 / Amiga Plus CD - 1995 - No. 5 and 6.iso / pd / serien / purity / nr.10 / demo / sparx.i / .spark16.i < prev    next >
Text File  |  1995-04-19  |  825b  |  61 lines

  1.  
  2. Procedure Spark16( rgbx : ColorArrayPtr);
  3.  
  4. Const
  5.     max4lines = 50;
  6. Type
  7.     Sp1lines      = Array[1..max4lines] of line;
  8.     Sp1LinesPtr   = ^Sp1Lines;
  9.  
  10.     moreColors    = Array[0..maxColors] of Short;
  11.     moreColorsPtr = ^moreColors;
  12.  
  13. Var
  14.     xy    : line;
  15.     arr    : moreColorsPtr;
  16.     CCNT,i,
  17.     actualline : Short;
  18.  
  19. Begin
  20.     SetSColors( rgbx );
  21.  
  22.     New(arr);
  23.     ActualLine := 1;
  24.  
  25.  
  26.     For i:=0 to MaxColors-1 do begin
  27.       arr^[i] := rgbx^[i];
  28.     end;
  29.  
  30.     CCNT  := 2;    { color }
  31.     xy.y1 := 0;
  32.     xy.y2 := 255;
  33.  
  34.     For i:=0 to 319 do begin
  35.       xy.x1 := i;
  36.       xy.x2 := i;
  37.  
  38.       DrawLine( Adr(xy), CCNT );
  39.  
  40.       inc( CCNT );
  41.       If CCNT >= maxColors then CCNT := 2;
  42.     End;
  43.  
  44.  
  45.     Repeat
  46.  
  47.       arr^[maxColors]:=arr^[2];
  48.       for i:=3 to MaxColors do
  49.         arr^[i-1] := arr^[i];
  50.  
  51.         SetSColors( arr );
  52.  
  53.     Until LeftMouseButton;
  54.  
  55.     Ciao;
  56.     Dispose(arr);
  57.     SetSColors(Adr(Def_Colors));
  58.  
  59. End;
  60.  
  61.